#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
  int n, m, a, b;
  cin >> n >> m >> a >> b;
  vector<pair<int, int>> songs(n);
  for (int i = 0; i < n; i ++) {
    songs[i].second = i + 1;
  }
  int fid = 0;
  int maxh = -1;
  for (int i = 0; i < a; i ++) {
    for (int j = 0; j < n; j ++) {
      int h;
      scanf("%d", &h);
      songs[j].first += h;
      if (b == i + 1 && h > maxh) {
        fid = j + 1;
        maxh = h;
      }
    }
  }
  sort(songs.begin(), songs.end(), greater<pair<int, int>>());
  for (int i = 0; i < n; i ++) {
    if (fid == songs[i].second) {
      if (i < m) {
        songs.insert(songs.begin(), songs[i]);
        songs.erase(songs.begin() + i + 1);
      } else {
        swap(songs[m - 1], songs[i]);
      }
      break;
    }
  }
  for (int i = 0; i < m; i ++) {
    cout << songs[i].second << ' ';
  }
  cout << endl;
}